<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script type="text/javascript">
        /* function f(m) {
            return m * 2;
        } 
        console.log(f(1+5));
        */
        // 等同于

        var thunk = function () {
            return 1 + 5;
        };

        function f(thunk) {
            return thunk() * 2;
        }
        console.log(f(thunk)); 
    </script>
</body>

</html>